package StudyCode.summary.mydatetime;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Month;
import java.time.format.DateTimeFormatter;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class DateTimeFormatterOption {
	public static void main(String[] args) {
		String pattern = "MM/dd/yyyy[ 'at' HH:mm:ss]";
		DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);

		LocalDate ld = LocalDate.of(2019, Month.NOVEMBER, 11);
		LocalTime lt = LocalTime.of(17, 30, 12);
		LocalDateTime ldt = LocalDateTime.of(ld, lt);

		String str1 = fmt.format(ld);
		System.out.println(str1);

		String str2 = fmt.format(ldt);
		System.out.println(str2);
	}
}
